In image compression methods such as Motion Picture Experts Group (MPEG)-1, MPEG-2, MPEG-4 and H.264/MPEG-4 Advanced Video Coding (AVC), one picture is divided into macroblocks to encode an image. Then, the respective macroblocks are encoded using inter prediction or intra prediction.
In inter prediction, a motion estimation is used to eliminate temporal redundancy between consecutive pictures. To detect the temporal redundancy, one or more reference pictures are used to estimate motion of a current block, and a motion compensation is performed to generate a prediction block using motion information. A block very similar to an original block is searched in a predetermined range of the reference picture. If a block similar to an original block is searched, a residual block between the original block and the prediction block and motion information are transmitted to enhance the coding efficiency.
A motion vector indicating difference between the current block and the similar block of the reference picture is needed to correctly decode the inter-coding block. Thus, the motion information should be inserted in a bit stream.
If the motion information is inserted in the bit stream without encoding, the coding efficiency decreases. Therefore, a motion vector predictor is generated using motion vectors of neighboring block, and the difference between the motion vector and the motion vector predictor is encoded to reduce the amount of coding bits required to encode the motion vector.
In H.264, the motion vector predictor is determined as a median of a left motion vector, an above motion vector and an above left motion vector. But, if a motion of the current block is different motions of the neighboring blocks, the coding efficiency of the motion vector degrades. Accordingly, a new method of encoding a motion vector is required when the motion of image is little or steady or the image to be encoded is a background image.